package com.tt.job.container;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 容器配置
 **/
@Component
@ConfigurationProperties(prefix = "job.container")
public class ContainerSettings {
    private List<ContainerAppSettings> apps;
    private boolean enable = false;

    public List<ContainerAppSettings> getApps() {
        return apps;
    }

    public void setApps(List<ContainerAppSettings> apps) {
        this.apps = apps;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public static class ContainerAppSettings {
        private String configClass;
        private String level;
        private String name;
        private String path;

        public String getConfigClass() {
            return configClass;
        }

        public void setConfigClass(String configClass) {
            this.configClass = configClass;
        }

        public String getLevel() {
            return level;
        }

        public void setLevel(String level) {
            this.level = level;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getPath() {
            return path;
        }

        public void setPath(String path) {
            this.path = path;
        }
    }
}
